<admintpl file="header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('indexadmin/admin_level_manager_list')}">管理员层级关系列表</a></li>
        <li class="active"><a>编辑管理员层级</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form" action="{:U('indexadmin/edit_admin_level')}">
        <fieldset>
            <div class="control-group">
                <label class="control-label">上级:</label>
                <div class="controls">
                    <select name="pid">
                        <option value="0">作为顶级账号</option>
                        {$select_categorys}
                    </select>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">管理员</label>
                <div class="controls">
                    <input type="text" value="{$data.name}" disabled class="disabled">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">当前父级管理员</label>
                <div class="controls">
                    <input type="text" value="{$data.pname}" disabled class="disabled">
                </div>
            </div>
        </fieldset>
        <div class="form-actions">
            <input type="hidden" name="id" value="{$data.id}" />
            <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
            <a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
            <!-- <button class="btn js-ajax-close-btn" type="submit">{:L('CLOSE')}</button> -->
        </div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    $(function() {
        $(".js-ajax-close-btn").on('click', function(e) {
            e.preventDefault();
            Wind.use("artDialog", function() {
                art.dialog({
                    id : "question",
                    icon : "question",
                    fixed : true,
                    lock : true,
                    background : "#CCCCCC",
                    opacity : 0,
                    content : "您确定需要关闭当前页面嘛？",
                    ok : function() {
                        setCookie('refersh_time_admin_menu_index', 1);
                        window.close();
                        return true;
                    }
                });
            });
        });
    });
</script>
</body>
</html>